<!DOCTYPE html>
<title>Synchronous CORS XHR after redirect on worker.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>

promise_test(async t => {
  const url = './resources/sync-cors-after-redirect-on-worker-worker.js';
  const event = await new Promise((resolve) => {
    const worker = new Worker(url);
    worker.onmessage = resolve;
  });

  assert_equals(event.data.substr(0, 4), 'PASS');
}, 'Synchronous CORS XHR after redirect on worker');
</script>
